﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace assistant
{
    public partial class Register : Form
    {
        ValidCode validCode = new ValidCode(4, ValidCode.CodeType.Numbers);
        public Register()
        {
            InitializeComponent();
        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void pictureBox1_Click(object sender, EventArgs e)
        { 
            this.pictureBox1.Image = Bitmap.FromStream(validCode.CreateCheckCodeImage());
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox5.Text==validCode.CheckCode)
            { 
                MessageBox.Show("1");
            }
            else 
            { MessageBox.Show("验证码错误，请从新输入！"); }
            
        }

    }
}
